package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.service.ApBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 86150
 */
@RestController
@RequestMapping("/app")
@Api(tags = "banner",description = "轮播图")

public class ApBannerController {
    @Resource
    private ApBannerService bannerService;
    @GetMapping("/bannlist")
    @ApiOperation("用户端：查询图片")

    public ResponseResult list(){
        return bannerService.apBanner();
    }
    @GetMapping("/bannId/{proid}")
    @ApiOperation("用户端：根据id查询图片")

    public ResponseResult id(@PathVariable("proid") Integer proid){
        return bannerService.bannerId(proid);
    }
}
